package com.mingdong.first.jianzaozhe;

public class AirShipDirectorImpl implements AirShipDirector {

	private AirShipBuilder builder;
	
	public AirShipDirectorImpl(AirShipBuilder builder){
		this.builder = builder;
	}
	
	public AirShip zuZhuhang() {

		AirShip airShip = new AirShip();
		
		Energy energy = builder.buildEnergy();
		FaSheQi faSheQi = builder.buildFaSheQi();
		FeixingCang feixingCang = builder.buildFeixinCang();
		
		airShip.setEnergy(energy);
		airShip.setFaSheQi(faSheQi);
		airShip.setFeixingCang(feixingCang);
		
		return airShip;
	}

}
